package wnhz.com.business.shareshop.activity.shoppingcart;

import android.app.Application;
import android.content.Intent;
import android.os.Build;
import android.os.Message;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.WindowManager;

import butterknife.BindView;
import butterknife.ButterKnife;
import wnhz.com.business.R;
import wnhz.com.business.base.MyBaseActivity;
import wnhz.com.business.groupshop.ui.SendSKUActivity;
import wnhz.com.business.impl.ActionBarClickListener;
import wnhz.com.business.view.TranslucentActionBar;

/**
 * SKU设置
 */
public class SkuSettingActivity extends MyBaseActivity implements ActionBarClickListener {
    @BindView(R.id.actionbar)
    TranslucentActionBar actionbar;

    @Override
    protected void handleMsg(Message msg) {

    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_sku_setting);
        ButterKnife.bind(this);
        actionbar.setData("sku设置", R.drawable.ic_lefft_white, null, 0, "+创建sku", 0, this);
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
            this.getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
            actionbar.setStatusBarHeight(getStatusBarHeight());
        }
    }

    public void rightClick() {
        startActivity(SendSKUActivity.createIntent(this));
    }

    @Override
    public void onLeftClick() {
        finish();
    }

    @Override
    public void onRightClick() {
        rightClick();
    }

    @Override
    public void onEditTextClick() {

    }

    public static Intent createIntent(Application application) {
        Intent intent = new Intent(application, SkuSettingActivity.class);
        return intent;
    }
}
